#include<stdio.h>

int main()
{
    int t, dur;
    int statr_time, end_time;
    int hour, min;
    scanf("%d %d",&t, &dur);
    statr_time = (t/100)*60 + t%100;
    end_time = statr_time + dur;
    hour = end_time/60;
    min = end_time - hour*60;
    printf("%d%02d",hour,min);

    return 0;

}